<?php

include_once('connexion.php');
$referer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : 'index.php';
	
if(isset($_POST['form_search_user_submit']))
{
	$searchCriteria = $_POST['form_search_user_text'];
	$_SESSION['usersResultSearch'] = $userManager->get($searchCriteria);
	$_SESSION['searchCriteria'] = $searchCriteria;
}
$urlRedirect = $referer.'&search';
header('Location: '.$urlRedirect);


?>